package com.yy.job.facade.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.yy.job.common.enums.JobExecuteTypeEnum;

public class YYJobModel implements Serializable {
	
	private static final long serialVersionUID = -1841075368358385810L;
	
	/**
	 * 项目code
	 */
	private String projectCode;
	
	/**
	 * 模块code
	 */
	private String moduleCode;
	
	/**
	 * 任务code
	 */
	private String jobCode;
	
	/**
	 * 业务号
	 */
	private String businessNo;
	
	/**
	 * 期望启动时间
	 */
	private Date expectedStartTime;
	
	/**
	 * 操作人
	 */
	private String operator;
	
	/**
	 * 步骤
	 */
	private List<YYJobStepModel> steps;
	
	/**
	 * 任务执行类型
	 */
	private JobExecuteTypeEnum jobExecuteType = JobExecuteTypeEnum.STANDARD;
	
	public String getProjectCode() {
		return projectCode;
	}

	public void setProjectCode(String projectCode) {
		this.projectCode = projectCode;
	}

	public String getModuleCode() {
		return this.moduleCode;
	}

	public void setModuleCode(String moduleCode) {
		this.moduleCode = moduleCode;
	}

	public String getJobCode() {
		return this.jobCode;
	}

	public void setJobCode(String jobCode) {
		this.jobCode = jobCode;
	}

	public String getBusinessNo() {
		return this.businessNo;
	}

	public void setBusinessNo(String businessNo) {
		this.businessNo = businessNo;
	}

	public String getOperator() {
		return this.operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	public List<YYJobStepModel> getSteps() {
		return steps;
	}

	public void setSteps(List<YYJobStepModel> steps) {
		this.steps = steps;
	}

	public Date getExpectedStartTime() {
		return expectedStartTime;
	}

	public void setExpectedStartTime(Date expectedStartTime) {
		this.expectedStartTime = expectedStartTime;
	}

	public JobExecuteTypeEnum getJobExecuteType() {
		return jobExecuteType;
	}

	public void setJobExecuteType(JobExecuteTypeEnum jobExecuteType) {
		this.jobExecuteType = jobExecuteType;
	}

	public void addJobStep(YYJobStepModel jobStep) {
		if (jobStep == null) {
			return;
		}
		if (this.steps == null) {
			this.steps = new ArrayList<>();
		}
		this.steps.add(jobStep);
	}
}
